home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Telephone Manager / Stiletto Sources / ModuleSources / GetIndHSConnect.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-26  |  2.2 KB  |  70 lines  |  [TEXT/MPS ]

  1. /************************************************************************************************/
  2. /*                                                                                                */
  3. /*    Module Name:    GetIndHSConnect                                                                */
  4. /*                                                                                                */
  5. /*    File Name:        GetIndHSConnect.c                                                            */
  6. /*                                                                                                */
  7. /*    © Apple Computer, Inc. 1994-1995                                                            */
  8. /*    All Rights Reserved                                                                            */
  9. /*                                                                                                */
  10. /*    Revision History:                                                                            */
  11. /*                                                                                                */
  12. /*        Date        Who                    Modification                                            */
  13. /*                                                                                                */
  14. /*        1994-06-21    Jaakko Railo        Original version                                        */
  15. /*                                                                                                */
  16. /************************************************************************************************/
  17.  
  18. /****************************************** DESCRIPTION ******************************************
  19.  
  20. *************************************************************************************************/
  21.  
  22. /******************************************** HEADERS *******************************************/
  23.  
  24. #ifndef __TELEPHONES__
  25. #include "Telephones.h"
  26. #endif
  27.  
  28. #include "TestModule.h"
  29.  
  30. /****************************************** DEFINITIONS *****************************************/
  31.  
  32. /****************************************** PROTOTYPES ******************************************/
  33.  
  34. void     DoTest (CHRSPtr paramPtr);
  35.  
  36. /************************************************************************************************/
  37. /************************************************************************************************/
  38.  
  39.  
  40. pascal short TestModule (CHRSPtr paramPtr)
  41. {
  42.     short    returnValue = noErr;
  43.     
  44.     if (paramPtr->version <= kTestModuleVersion) {
  45.         
  46.         DoTest (paramPtr);
  47.         
  48.     }
  49.     else
  50.         returnValue = kWrongVersion;
  51.         
  52.     return (returnValue);
  53. }
  54.  
  55.  
  56. void DoTest (CHRSPtr paramPtr)
  57. {
  58.     TELHandle    termHand = GetCurrentTELHandle (paramPtr);
  59.     OSErr        errCode;
  60.     Boolean        handsetConnect;
  61.     
  62.     if ((errCode = TELGetIndHSConnect (termHand, &handsetConnect)) == noErr)
  63.         Print (paramPtr, "TELGetIndHSConnect --> HandsetConnect = %s", 
  64.                 ((handsetConnect==telIndHSConnected)?"telIndHSConnected":"telIndHSDisconnected"));
  65.     else
  66.         Print (paramPtr, "### TELGetIndHSConnect failed : %d", errCode);
  67. }
  68.  
  69.  
  70.